<!--
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/business/stagingarea/StagingLocation.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/business/stagingarea/StagingLocation.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '工位位置表',
                name: 'stagingarea/StagingLocation',
                url: "/StagingLocation/",
                sortName: "Sort,TheRow",
                foreignKey:null
            });
            const editFormFields = ref({"TheRow":"","TheColumn":"","SLName":"","Sort":"","IsOccupy":"","MaterialBoxNo":"","RFIDNo":"","UpdateTime":"","LocationDescription":"","Enable":""});
            const editFormOptions = ref([[{"title":"第几排","field":"TheRow","type":"number"},
                               {"title":"第几个","field":"TheColumn","type":"number"},
                               {"title":"区位编号","field":"SLName"}],
                              [{"title":"排序号","field":"Sort","type":"number"},
                               {"title":"是否占用","field":"IsOccupy","type":"switch"},
                               {"title":"当前料箱号","field":"MaterialBoxNo"}],
                              [{"title":"当前料箱RFID号","field":"RFIDNo"},
                               {"title":"更新时间","field":"UpdateTime","type":"datetime"},
                               {"title":"更新描述","field":"LocationDescription"}],
                              [{"title":"是否启用","field":"Enable","type":"switch"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StagingAreaId',title:'区位ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'TheRow',title:'第几排',type:'int',sort:true,width:80,align:'left',sort:true},
                       {field:'TheColumn',title:'第几个',type:'int',width:80,align:'left'},
                       {field:'SLName',title:'区位编号',type:'string',link:true,width:110,align:'left'},
                       {field:'Sort',title:'排序号',type:'int',sort:true,width:80,align:'left'},
                       {field:'IsOccupy',title:'是否占用',type:'int',width:80,align:'left'},
                       {field:'MaterialBoxNo',title:'当前料箱号',type:'string',width:110,align:'left'},
                       {field:'RFIDNo',title:'当前料箱RFID号',type:'string',width:110,align:'left'},
                       {field:'UpdateTime',title:'更新时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'LocationDescription',title:'更新描述',type:'string',width:110,align:'left'},
                       {field:'Enable',title:'是否启用',type:'int',width:80,align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:80,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:80,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
